package com.woniuxy.consumer.student.configuration;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: linKe
 * @Date: 2022/1/20 9:51
 * @FileName: RestTemplateConfiguration
 * @version: 1.0
 * @Description: RestTemplate配置类
 */
@Configuration
public class RestTemplateConfiguration {
    /**
     * `@LoadBalanced 启用负载均衡
     * @return  结果
     */
    @LoadBalanced
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
